<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!doctype html>
<html lang="zh-cn">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->

    <title>惠农网 - 管理员注册</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css" />
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/my.css" />
</head>

<body class="bg-light">
<div class="container">
    <div class="py-5 text-center">

        <h2>您正在修改惠农网用户信息</h2>
        <p class="lead">涉及用户信息，请谨慎操作</p>
    </div>

    <div class="row">

        <div class="col-md-12 order-md-1">
            <form class="needs-validation" action="${pageContext.request.contextPath}/user/edit" method="post" novalidate>

                <div class="mb-3">
                    <label for="euUserId">用户名(*)： <span class="text-muted"></span></label>
                    <input type="text" class="form-control" id="euUserId" name="euUserId" value="${ebUser.euUserId}" required>
                    <div class="invalid-feedback">
                        请填写用户名
                    </div>
                </div>

                <div class="mb-3">
                    <label for="euUserName">真实姓名(*)： <span class="text-muted"></span></label>
                    <input type="text" class="form-control" id="euUserName" name="euUserName" value="${ebUser.euUserName}" required>
                    <div class="invalid-feedback">
                        请填写真实姓名
                    </div>
                </div>

                <div class="mb-3">
                    <label for="euPassword">登录密码(*)： <span class="text-muted"></span></label>
                    <input type="password" class="form-control" id="euPassword" name="euPassword" value="${ebUser.euPassword}" required>
                    <div class="invalid-feedback">
                        请填写密码
                    </div>
                </div>

                <div class="mb-3">
                    <label for="Password">确认密码(*)： <span class="text-muted"></span></label>
                    <input type="password" class="form-control" id="Password" placeholder="" required>
                    <div class="invalid-feedback">
                        请填写相同密码
                    </div>
                </div>

                <div class="d-block my-3">
                    <label>性别(*)： <span class="text-muted"></span></label>
                    <div class="custom-control custom-radio">
                        <input id="nan" name="euSex" type="radio" class="custom-control-input" value="T" checked required>
                        <label class="custom-control-label" for="nan">男</label>
                    </div>
                    <div class="custom-control custom-radio">
                        <input id="nv" name="euSex" type="radio" class="custom-control-input" value="F" required>
                        <label class="custom-control-label" for="nv">女</label>
                    </div>
                </div>



                <div class="mb-3">
                    <label for="euBirthday">出生日期： <span class="text-muted"></span></label>
                    <input type="date" class="form-control" id="euBirthday" name="euBirthday" placeholder="${ebUser.euBirthday}">
                    <div class="invalid-feedback">
                        请填写相同密码
                    </div>
                </div>



                <div class="mb-3">
                    <label for="euIdentityCode">身份证： <span class="text-muted"></span></label>
                    <input type="number" class="form-control" id="euIdentityCode" name="euIdentityCode" placeholder="">
                    <div class="invalid-feedback">
                        请填写身份证号
                    </div>
                </div>

                <div class="mb-3">
                    <label for="euEmail">电子邮件： <span class="text-muted"></span></label>
                    <input type="email" class="form-control" id="euEmail" name="euEmail" placeholder="${ebUser.euEmail}">
                    <div class="invalid-feedback">
                        请填写电子邮箱
                    </div>
                </div>

                <div class="mb-3">
                    <label for="euMobile">手机： <span class="text-muted"></span></label>
                    <input type="tel" class="form-control" id="euMobile" name="euMobile" placeholder="${ebUser.euMobile}">
                    <div class="invalid-feedback">
                        请填写手机号码
                    </div>
                </div>

                <div class="mb-3">
                    <label for="euAddress">地址： <span class="text-muted"></span></label>
                    <input type="text" class="form-control" id="euAddress" name="euAddress" placeholder="${ebUser.euAddress}">
                    <div class="invalid-feedback">
                        请填写地址
                    </div>
                </div>

                <hr class="mb-4">
                <button class="btn btn-primary btn-lg btn-block" type="submit">立即更新</button>
            </form>
        </div>


    </div>






    <footer class="my-5 pt-5 text-muted text-center text-small">
        <p class="mb-1">&copy; 2020 程鑫达、赵润蕾、叶贝、辛清清的合作项目</p>
    </footer>
</div>



<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/popper.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/bootstrap.min.js"></script>

<script>
    // Example starter JavaScript for disabling form submissions if there are invalid fields
    (function () {
        'use strict'

        window.addEventListener('load', function () {
            // Fetch all the forms we want to apply custom Bootstrap validation styles to
            var forms = document.getElementsByClassName('needs-validation')

            // Loop over them and prevent submission
            Array.prototype.filter.call(forms, function (form) {
                form.addEventListener('submit', function (event) {
                    if (form.checkValidity() === false) {
                        event.preventDefault()
                        event.stopPropagation()
                    }
                    form.classList.add('was-validated')
                }, false)
            })
        }, false)
    }())
</script>
</body>
</html>
